<!DOCTYPE html>
<html lang="en" style="background:#fff;">
<head>
    <base href="${basePath}">
    <#include "common/top.html"/>
</head>
<body style="background:#fff;overflow: hidden">
<form class="layui-form" modelAttribute="uploadfile" name="form1" id="form1"  method="post">
    <div class="layui-form-item-dept">
                                                                            
                                            <div class="layui-form-item">
                            <label class="layui-form-label"><span style="color: red;">*</span>主键：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="fileid" id="fileid" maxlength="50" placeholder="这里输入主键" title="主键"/>
                            </div>
                        </div>
                                                                                                                            
                                            <div class="layui-form-item">
                            <label class="layui-form-label">所属：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="ownerid" id="ownerid" maxlength="50" placeholder="这里输入所属" title="所属"/>
                            </div>
                        </div>
                                                                                                                            
                                            <div class="layui-form-item">
                            <label class="layui-form-label">名称：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="filename" id="filename" maxlength="50" placeholder="这里输入名称" title="名称"/>
                            </div>
                        </div>
                                                                                                                            
                                            <div class="layui-form-item">
                            <label class="layui-form-label">地址：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="fileurl" id="fileurl" maxlength="50" placeholder="这里输入地址" title="地址"/>
                            </div>
                        </div>
                                                                                                                            
                                            <div class="layui-form-item">
                            <label class="layui-form-label">属性：</label>
                            <div class="layui-input-inline">
                                <select id="filetype" name="filetype" lay-filter="filetype">

                                    
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                        </div>

                                                            </div>
</form>
</body>
<script type="text/javascript">

    layui.use(['form','table','laydate'], function(){
        var form = layui.form;
        var laydate = layui.laydate;

                                                                                                                    form.render();

    });


    function submitHandler() {
        var prefix = basePath + "system/uploadfile";
        $.operate.post(prefix + '/addUploadfile', $("#form1").serializeArray(), function(result) {
            if (result.status == true) {
                layer.alert(result.msg,function(index){
                    var index1 = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index1);
                    layer.close(index);
                });
            }else{
                parent.layer.alert(result.msg);
            }
        });
    }
</script>
</body>
</html>